#include"processpool.hpp"
int main(int argc, char *argv[])
{
    if (argc != 2)
    {
        Usage(argv[0]);
        return UsageError;
    }

    std::vector<Channel> channels;
    int num = stoi(argv[1]);
    InitProcessPoll(channels, num, Worker);
    // DebugPrint(channels);
    // 派发任务
    DispatchTask(channels);
    // 3,退出进程池
    CleanProcessPool(channels);
    sleep(100);
    return 0;
}